﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CreateStaticHtml.Pages
{
    public partial class ProductNodes : System.Web.UI.Page
    {
        public bool IsLogin = false;
        public List<Models.TreeNode> nodes = null;
        public Models.Product product = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterHyperLink.NavigateUrl = "../Default.aspx";
            if (Session["user"] != null)
            {
                IsLogin = true;
            }
            DavidDB.ADO.DBManager db = new DavidDB.ADO.DBManager();
            Interface.ITreeNode iNode = Impl.ImplTreeNode.GetInstance(db);
            Models.TreeNode _node = new Models.TreeNode();
            _node.ProductId = Convert.ToInt32(Request.QueryString["docid"]);
            nodes = iNode.GetSomeObject(_node);

            Interface.IProduct iProduct = Impl.ImplProduct.GetInstance(db);
            product = iProduct.GetModel(Convert.ToInt32(Request.QueryString["docid"]));
            db.Commit();
            db.Dispose();
        }
    }
}